<template>
    <div class="content paper-layout">
        <FormPaper v-if="show" :data="selectedData" :bc="submit" :before="before" />
    </div>
</template>
<script>
import FormPaper from './components/form-paper'
import { getOnePaper } from '@/api/paper'
export default {
    components: {
        FormPaper
    },
    data () {
        return {
            selectedData: [],
            show: false
        }
    },
    methods: {
        handleBack () {
            this.$router.replace({
                name: 'testPaperList'
            })
        },
        next () {
            // 分类
            this.ifNext = true
        },
        before () {
            this.ifNext = false
        },
        submit (data) {
        }
    },
    mounted () {
        let id = this.$route.query.id
        if (id) {
            getOnePaper({ paperId: id }).then(res => {
                this.selectedData = res.data.data
                console.log(this.selectedData)
                this.show = true
            })
        }
    }
}
</script>
<style lang="less" scoped>

</style>
